1. Field of the Invention
The present invention relates to an image capturing apparatus and a control method thereof, and more particularly, to an image capturing apparatus with an auto-focus function and a control method thereof.
2. Description of the Related Art
Conventionally, an image capturing apparatus that uses an imaging element, such as a CCD or CMOS image sensor, and that has an auto-focus (AF) function is known. One of the AF systems performed in the image capturing apparatus is a contrast method. In AF of the contrast method, an HPF (high-pass filter) extracts a signal, which indicates the contrast, from an electrical signal obtained by photoelectrically converting subject light entered into the imaging element through a focus lens and amplifies the signal. The waveform of the amplified contrast signal is analyzed, and auto focus is performed by focusing the subject based on the analysis result.
Specifically, the image capturing apparatus with the auto-focus function performs a focusing operation by using a phenomenon that the waveform of the contrast signal is gentle when the subject is not focused and is sharp when the subject is focused. More specifically, the focus lens is moved in the optical axis direction to search the lens position where the waveform of the contrast signal obtained from the subject image output from the imaging element in accordance with the lens drive is the sharpest. The series of operations for moving the focus lens to search the focus position will be called auto-focus scan.
Meanwhile, Japanese Patent Laid-Open No. 06-303491 discloses an image capturing apparatus with an auto-focus function which detects, for example, a person as a subject, obtains information of the distance to the detected subject, and adjusts the focal length, the focus position, and the aperture of the imaging lens based on the obtained distance so that the subject falls within the depth of field.
Japanese Patent Laid-Open No. 2003-75717 describes a method of calculating the distance to the subject using an image capturing apparatus. The image capturing apparatus includes a distance detection apparatus that detects the distance (subject distance) from the image capturing apparatus to the subject based on the proportion of an image of the captured subject in the display screen.
Japanese Patent Laid-Open No. 2004-317699 proposes a technique for detecting a face from an imaging signal and narrowing the scan range based on the face detection result, the subject distance, and the depth of field information to reduce the time required for the auto-focus scan.
The depth of field denotes a range from the near point to the far point determined based on the following Expressions (1) and (2) using a distance to an in-focus point, a focal length, an acceptable circle of confusion, and an f-number as shown in FIGS. 10A and 10B.Near point (depth to the near side)=(hyperfocal distance (Hd)×distance to an in-focus point)/(hyperfocal distance (Hd)+distance to an in-focus point)  (1)Far point (depth to the far side)=(hyperfocal distance (Hd)×distance to an in-focus point)/(hyperfocal distance (Hd)−distance to an in-focus point)  (2)
For example, as shown in FIG. 10B, when the hyperfocal point coincides with the in-focus point, the subject is substantially clear within a range from a midpoint (Hd/2) between an imaging position (0) and a hyperfocal point to infinity. The hyperfocal distance increases with an increase in the lens focal length and increases with an decrease in the f-number. The midpoint (Hd/2) between the imaging position (0) and the hyperfocal point is also a shortest distance point, i.e. a near point, that falls within the depth of field when the hyperfocal point coincides with the in-focus point.
The hyperfocal distance is determined based on the following Expression (3).Hyperfocal distance=(lens focal length)2/(acceptable circle of confusion×f-number)  (3)The acceptable circle of confusion denotes a “defocusing tolerance” indicating a lower limit that can be recognized by naked eye in a normal observation.
Japanese Patent Laid-Open No. 2008-167295 discloses a technique for identifying the face of a person as follows. Reliability is calculated from a correlation value between a distance D1 to the subject obtained based on the proportion, in the display screen, of the size of the image of the subject detected from the captured image area and a distance D2 to the subject obtained based on the focal length and the focus position of the imaging lens. The face is identified when the reliability exceeds a predetermined threshold.
However, if the detected subject is the face of a person in a picture, the subject distance may be falsely detected when the distance to the subject is calculated based on the information of the focal length, the size of the display screen, and the size of the detected face as described above. The detected face may not be focused when the auto-focus scan is performed by calculating the auto-focus scan range based on the falsely detected subject distance. Or the auto-focus scan needs to be performed again with an enlarged auto-focus scan range, which causes a problem that it takes a long time until properly focusing on the detected face.
The process of identifying the face of a person based on the method of Japanese Patent Laid-Open No. 2008-167295 is a process executed after the recognition of the focus position of the imaging lens when the subject is focused by the auto focus. Therefore, the process cannot be used to calculate the auto-focus scan range.
In flash imaging, if an amount of flash light is determined in accordance with the falsely detected subject distance, a sufficient amount of light may not be obtained, or the light may be too bright. Therefore, an image with appropriate exposure may not be obtained.